#include <stdio.h>

void fenge(int* p, long N, int I)
{
    for (int i = 0; i < I; i++)
    {
        p[i] = N % 10;
        N /= 10;
    }
}

void Print(int* p, int I)
{
    for (int i = I - 1; i >= 0; i--)
    {
        printf("%d", p[i]);
        if (i % 3 == 0 && i != 0)
            printf(",");
    }
}

int main() 
{
    long n = 0;
    scanf("%d", &n);
    int i = 0;
    int arr[] = { 0 };
    long temp = n;
    while (temp)
    {
        i++;
        temp /= 10;
    }
    fenge(arr, n, i);
    Print(arr,i);
    return 0;
}